<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="../js/vue.js"></script>

<body>
    <div id="root">
        <h2>欢迎来到{{name}}学习</h2>
        <button v-on:click="showInfo1">点我提示信息</button>
        <button @click="showInfo2(66,$event)">点我提示信息</button>
    </div>
</body>
<script>
    new Vue({
        el: '#root',
        data: {
            name: '尚硅谷'
        },
        methods: {
            showInfo1(event) {
                // console.log(event);
                // console.log('123');
                // console.log(a, b, c, d);
                // alert('同学你好')
            },
            showInfo2(number, a) {
                console.log(number)
                console.log(a);
            }
        }
    })
</script>

</html>